package com.bestcem.xm.member.grpc.service.param.member;

import com.bestcem.xm.common.core.constant.RegTypes;
import com.bestcem.xm.member.grpc.service.param.PageParam;
import com.bestcem.xm.member.grpc.service.param.SortParam;
import lombok.Getter;
import lombok.Setter;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.util.List;

/**
 * 联系人过滤参数校验
 *
 * @author yf.wang <yf.wang@idiaoyan.com>
 * @version V1.0
 * @date 2021/7/29
 */

@Getter
@Setter
public class FilterMembersParam {
    /**
     * 组织ID
     */
    @NotNull(message = "组织ID不能为空")
    @Pattern(regexp = RegTypes.OBJECT_ID, message = "组织ID格式错误")
    private String orgId;

    private String condition;

    private String search;

    private String eqSearch;

    private Integer attribute;

    /**
     * 分页参数
     */
    @NotNull(message = "分页参数不能为空")
    @Valid
    private PageParam pageParam;

    private List<SortParam> sortParams;
}
